local qiangyun = fk.CreateSkill {
  name = "lingling__qiangyun",
}

Fk:loadTranslationTable{
  ["lingling__qiangyun"] = "强运",
  [":lingling__qiangyun"] = "摸牌阶段，你改为投掷一个6面骰子，然后摸点数张牌，若你体力为1或手牌不多于1则可以重新投掷一次。",

  ["#lingling__qiangyun-change"] = "强运：点数为%arg，是否要重投一次？",
  ["#lingling__liuxiu_random"] = "%from 掷骰子结果为：%arg",
}

qiangyun:addEffect(fk.DrawNCards, {
  anim_type = "drawcard",
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local n = math.random(6)
    room:sendLog({
      type = "#lingling__liuxiu_random",
      from = player.id,
      arg = n,
      toast = true,
    })
    if (player.hp == 1 or player:getHandcardNum() < 2) and
      room:askToSkillInvoke(player, {
      skill_name = qiangyun.name,
      prompt = "#lingling__qiangyun-change:::"..n,
    }) then
      math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 6)))
      n = math.random(6)
      room:sendLog({
        type = "#lingling__liuxiu_random",
        from = player.id,
        arg = n,
        toast = true,
      })
    end
    data.n = n
  end,
})

return qiangyun
